package com.asp.alumnisystem.presenter;

import com.asp.alumnisystem.app.App;
import com.asp.alumnisystem.base.BaseBean;
import com.asp.alumnisystem.base.BasePresenter;
import com.asp.alumnisystem.base.IView;
import com.asp.alumnisystem.model.NoticeModel;
import com.asp.alumnisystem.model.PageModel;
import com.asp.alumnisystem.net.RetrofitManager;

import java.util.List;

import io.reactivex.Observable;

/**
 * 首页请求公告列表信息的Presenter
 */
public class NoticeListPresenter extends BasePresenter<PageModel, List<NoticeModel>> {

    public NoticeListPresenter(IView view) {
        super(view);
    }

    @Override
    protected Observable<BaseBean<List<NoticeModel>>> requestNet(PageModel pageModel) {
        return RetrofitManager.getApi().getNoticeList(App.getApp().getUserId(), pageModel.getNowPage(), pageModel.getPageSize());
    }

}